package com.cn.qtms.service;//类注释设置模板

import com.cn.qtms.base.service.BaseService;
import com.cn.qtms.entity.TsAttachment;
import org.springframework.data.repository.query.Param;

import java.util.List;

/**
 * @Name:TsAttachmentService
 * @Description:
 * @Author: zhangyang
 * @Date 2019-12-01 14:49
 **/

public interface TsAttachmentService extends BaseService<TsAttachment,Long> {
    /**
     * 删除文件
     * @param path
     * @return
     */
    TsAttachment deleteAttachMent(String path);

    /**
     * 查询某个数据的文件集合
     * @param relatedTable
     * @param relatedId
     * @param fileType
     * @return
     */
    List<TsAttachment> findTsAttachments(@Param("relatedTable") String relatedTable, @Param("relatedId") Long relatedId, @Param("fileType") String fileType);

    /**
     * 查询数据的文件名集合
     * @param relatedTable
     * @param relatedId
     * @param fileType
     * @return
     */
    List<String>  findAttachments(@Param("relatedTable") String relatedTable, @Param("relatedId") Long relatedId, @Param("fileType") String fileType);
}
